﻿using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Quickly.Identity.Domain
{
    public class AuthorizeData : IAuthorizeData
    {
        public static AuthorizeData FromRoles(params string[] roles) => new AuthorizeData(null, string.Join(",", roles), null);

        public AuthorizeData(string? policy, string? roles, string? authenticationSchemes)
        {
            Policy = policy;
            Roles = roles;
            AuthenticationSchemes = authenticationSchemes;
        }

        public string? Policy { get; set; }
        public string? Roles { get; set; }
        public string? AuthenticationSchemes { get; set; }
    }
}
